package OSMS.action.User;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import OSMS.entity.Customers;
import OSMS.tools.JDBC_Util;
import OSMS.dao.*;
public class Cus_Logout_Servlet extends HttpServlet {
	
	@Override
	protected void doPost(
			HttpServletRequest request, 
			HttpServletResponse response) throws ServletException, IOException {
	
			HttpSession session = request.getSession();
			session.removeAttribute("cus"); 								//将用户信息添加至session
			
			response.sendRedirect(request.getServletContext().getContextPath() + "/jsp/user/index");//返回登录界面
		
	}
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		this.doPost(request, response);
	}
	

	
}
